#!/usr/bin/python
# vim:ts=4:sw=4:softtabstop=0:smarttab


include("database.conf")
include("icons.conf")

# User to run handler as. Main server must be run as root for this to have
# any effect.
USERNAME = "tester"

ADMINS = [
    'Me Myself <me@mydomain.biz>',
]

#MIDDLEWARE = [("firepython.middleware.FirePythonWSGI",)]
MIDDLEWARE = []

# Map pattern to handler functions. 
LOCATIONMAP = (
#  (r"^/api/(?P<methodname>\w+)$", "pycopia.db.webservice.dispatcher"),
  (r"^/?$", "pycopia.QA.webui.testcases.main"),
  # test cases
  (r"^/dashboard/$", "pycopia.QA.webui.dashboard.main"),
  (r"^/dashframe/$", "pycopia.QA.webui.dashboard.dashframe"),
# basic testcase editor
  (r"^/testcase/$", "pycopia.QA.webui.testcases.testcase_list"),
  (r"^/testcase/view/(?P<tcid>\S+)/?$", "pycopia.QA.webui.testcases.testcase_view"),
  (r"^/testcase/view/?$", "pycopia.WWW.framework.redirectup"),
  (r"^/testcase/edit/(?P<tcid>\S+)/?$", "pycopia.QA.webui.testcases.testcase_edit"),
  (r"^/testcase/edit/?$", "pycopia.WWW.framework.redirectup"),
  (r"^/testcase/run/(?P<tcid>\S+)/?$", "pycopia.QA.webui.testcases.testcase_run"),
  (r"^/testcase/run/?$", "pycopia.WWW.framework.redirectup"),
  (r"^/testcase/new/?$", "pycopia.QA.webui.testcases.testcase_create"),
  # test results
  (r"^/testresults/?$", "pycopia.QA.webui.testresults.testresults_list"),
    # media locations. aliases don't have a dot in the name.
  (r'/media/css/(?P<name>\S+)', "css"),
  (r'/media/js/(?P<name>\S+)', "js"),
  (r'/media/images/(?P<name>\S+)', "images"),
  (r'/auth/login', "login"),
  (r'/auth/logout', "logout"),
)
